

package com.hazelcast.internal.util.phonehome;

import com.hazelcast.instance.impl.Node;

import static com.hazelcast.internal.util.phonehome.PhoneHomeMetrics.DYNAMIC_CONFIG_PERSISTENCE_ENABLED;

class DynamicConfigMetricsProvider implements MetricsProvider {

    @Override
    public void provideMetrics(Node node, MetricsCollectionContext context) {
        boolean isEnabled = node.getNodeEngine().getConfig().getDynamicConfigurationConfig().isPersistenceEnabled();
        context.collect(DYNAMIC_CONFIG_PERSISTENCE_ENABLED, isEnabled);
    }
}
